home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / forlib1.arc / STJRP01.DOC < prev    next >
Text File  |  1986-04-01  |  10KB  |  217 lines

  1. MICROSOFT FORTRAN COMPILER ASSEMBLER ENHANCMENTS    V 1.02
  2.                             (C) John R. Petrocelli    04/01/86
  3.                                 3890 Carman Rd.
  4.                                 Schenectady, N.Y. 12303
  5.  
  6. ------------------------------------------------------------------------
  7.  
  8.    All of the following routines are included in the file  STJRP01.LIB
  9.  
  10. ------------------------------------------------------------------------
  11.  
  12.       Permission is granted to copy and incorporate these routines in any
  13. user written code. As such no fee may be associated with their individual
  14. copying and use. This DOES NOT PRECLUDE fees associated with user written
  15. software which may incorporate these routines. In all cases, however, all
  16. copyright notes must remain intact.
  17.  
  18.      The author makes no waranties of any kind and assumes no respons-
  19. ability for loss of data or time associated with their use.
  20.  
  21.      All of the routines have been tested and performed as specified in
  22. each of the tests. Any problems, suggestions or comments should be
  23. fowarded to the author.
  24.  
  25. ------------------------------------------------------------------------
  26. ------------------------------------------------------------------------
  27.  
  28.    All of the following routines are included in the file  STJRP01.LIB
  29.  
  30.    Should you need to alter any of the routines you merely have to enter
  31.    it as an  .OBJ file at LINK time. The LINKER will accept the first
  32.    name matched for a call or function.
  33.  
  34. ------------------------------------------------------------------------
  35. ------------------------------------------------------------------------
  36.  
  37.  1. Date and Time--------------object module "TOD.OBJ"
  38.     CALL PCDATE(YEAR,MONTH,DAY)
  39.          Note: arguments should be declared integer*2
  40.  
  41.     CALL PCTIME(HOUR,MINUTE,SECOND,MILSEC)
  42.          Note: arguments should be declared integer*2
  43.  
  44.     CALL TAD(MO1,MO2,DA1,DA2,YEAR,YR1,YR2,HR1,HR2,MIN1,MIN2,SEC1,SEC2)
  45.          Note: 1. arguments should be declared integer*2
  46.                2. this is a FORTRAN LANGUAGE SUBROUTINE which will
  47.                   interface with PCDATE and PCTIME
  48.                3. the variables  xx1 and xx2 are the 10's and 1's
  49.                   digit for each of the various parameters(MO=month
  50.                   DA=day  etc) while the variable YEAR is the full
  51.                   4 digit YEAR value.
  52.  
  53. ------------------------------------------------------------------------
  54.  
  55.  1. Day of Week ---------------object module "DOW.OBJ"
  56.     CALL WEEKDY(MONTH,DAY,YEAR,DOFWK)
  57.          Note: 1. arguments should be declared Integer*2
  58.                2. Year must be the full 4 digit year(1980,1985 etc)
  59.                   and may range from 1901 to 2099. Leap years are
  60.                   properly handled since the year 2000 is a turn of
  61.                   the century divisible by 400 and it is in fact also
  62.                   divisible by 4 like the normal leap years
  63.                3. The variable DOFWK is the integer specifying the
  64.                   DAY OF WEEK where: 1=Sunday     2=Monday    3=Tuesday
  65.                                      4=Wednesday  5=Thursday  6=Friday
  66.                                      7=Saturday
  67.  
  68. ------------------------------------------------------------------------
  69.  
  70.  2. String manipulation--------object module "STRING.OBJ"
  71.     CALL SUBSTR(TARGET,TSTART,TEND,SOURCE,SSTART,SEND)
  72.          Note: 1. arguments TARGET and SOURCE must be character
  73.                2. agruments TSTART, TEND, SSTART, and SEND should
  74.                   be declared integer*2
  75.                3. this routine will copy characters from SOURCE
  76.                   possition SSTART to SEND into characters of
  77.                   TARGET possition TSTART to TEND
  78.  
  79. ------------------------------------------------------------------------
  80.  
  81.  3. Video Display control------object module "VIDEO.OBJ"
  82.     CALL VIDCOL(COLOR)
  83.          Note: 1. argument COLOR must be declared character*2
  84.                2. COLOR is a value as defined on page 13-9 of
  85.                   the DOS manual
  86.                3. This routine requires that your "CONGIG.SYS" file
  87.                   contains the parameter "DEVICE=ANSI.SYS"
  88.  
  89.     CALL VIDCLR
  90.          Note: 1. This will clear the screen
  91.                2. This routine DOES NOT REQUIRE that your "CONFIG.SYS"
  92.                   file contains the parameter "DEVICE=ANSI.SYS"
  93.  
  94.     CALL VIDCLZ
  95.          Note: 1. This will clear the screen
  96.                2. This routine REQUIRES that your "CONGIG.SYS" file
  97.                   contains the parameter "DEVICE=ANSI.SYS"
  98.  
  99.     CALL VIDLCR(ROW,COL)
  100.          Note: 1. arguments ROW and COL must be declared integer*2
  101.                2. this routine will determine what row and column the
  102.                   cursor is located on the display
  103.  
  104.     CALL VIDMCR(ROW,COL)
  105.          Note: 1. arguments ROW and COL must be declared integer*2
  106.                2. this routine will move the cursor to the specified
  107.                   row and column on the display
  108.                3. backslash (\) editing may be needed in your FORMAT
  109.                   statements
  110.  
  111.     CALL VIDCSR(START,END,CODE,RC)
  112.          Note: 1. arguments START, END, CODE, and RC should be
  113.                   declared integer*2
  114.                2. arguments START and END reference the cursor lines
  115.                   (0 to 4 for the monochrome display  and 0 to 7 for
  116.                   the color graphics display) from top to bottom. if
  117.                   START is greater than END then the cursor is split
  118.                3. argument CODE may be 0 to get the cursor START and
  119.                   END lines or 1 to set the lines
  120.                4. argument RC is the return code from the call
  121.  
  122.     CALL VIDSCN(SCREEN)
  123.          Note: 1. argument SCREEN should be declared integer*2
  124.                2. argument SCREEN is the active screen on the display
  125.                   (0 to 7 in 40 column text mode and 0 to 3 in 80
  126.                   column text mode)
  127.  
  128.     CALL VIDMOD(MODE)
  129.          Note: 1. argument MODE should be declared integer*2
  130.                2. argument MODE is the current video mode as follow:
  131.                   0=40x25 b/w alpha        4=320x200 color graphics
  132.                   1=40x25 color alpha      5=320x200 b/w graphics
  133.                   2=80x25 b/w alpha        6=640x200 b/w graphics
  134.                   3=80x25 color alpha
  135.  
  136. ------------------------------------------------------------------------
  137.  
  138.  4. Keyboard Input Control-----object module "KEYPGM.OBJ"
  139.     CALL KEYBUF(BUFFER,KEYSIN,CHARIN)
  140.          Note: 1. arguments BUFFER and KEYSIN should be declared
  141.                   integer*2
  142.                2. argument CHARIN must be declared character*n
  143.                   where n is the maximum number of characters that
  144.                   will be read in
  145.                3. argument BUFFER is the maximum number of characters
  146.                   (not including <enter>) that may be typed in before
  147.                   the speaker will beep
  148.                4. argument KEYSIN is the number of characters actually
  149.                   input (not including <enter>)
  150.                5. argument CHARIN will return the characters actually
  151.                   input (not including <enter>)
  152.                6. this routine is useful in limiting the length of
  153.                   data entry vs using a read which may truncate input
  154.                   characters
  155.                7. if the requested character count (BUFFER) is greater
  156.                   than 80 or less than 1 then the returned value of
  157.                   KEYSIN is set to 255
  158.  
  159.     CALL KEYIN(CHARIN)
  160.                1. argument CHARIN should be declared character*1
  161.                2. this routine will cause the program to wait for
  162.                   a key stroke before continuing and return the
  163.                   actual key typed in CHARIN
  164.  
  165. ------------------------------------------------------------------------
  166.  
  167.  4. Sound----------------------object module "SOUND.OBJ"
  168.     CALL SOUND(FREQ,HSEC)
  169.          Note: 1. arguments FREQ and HSEC must be declared integer*4
  170.                2. argument FREQ is the frequency in HERTZ ranging
  171.                   from 21 to 65535
  172.                3. argument HSEC is the duration in hundredths(.01)
  173.                   seconds ranging from 0 to 65535
  174.  
  175. ------------------------------------------------------------------------
  176.  
  177.  5. peak n poke----------------object module "PEAKPOKE.OBJ"
  178.     CALL PEAK(SEGMNT,OFFSET,VALUE)
  179.          note: 1. arguments SEGMNT, OFFSET, and VALUE should be
  180.                   declared integer*2
  181.                2. this routine will return VALUE with the contents of
  182.                   memory address SEGMNT:OFFSET
  183.  
  184.     CALL POKE(SEGMNT,OFFSET,VALUE)
  185.          note: 1. arguments SEGMNT, OFFSET, and VALUE should be
  186.                   declared integer*2
  187.                2. this routine will load VALUE into the contents of
  188.                   memory address SEGMNT:OFFSET
  189.  
  190. ------------------------------------------------------------------------
  191.  
  192.  5. dos functions -------------object module "DOSFOR.OBJ"
  193.     CALL DOSVER(MAJOR,MINOR)
  194.          note: 1. arguments MAJOR AND MINOR should be declared
  195.                   integer*2
  196.                2. this routine will return MAJOR and MINOR components
  197.                   of the DOS version. Thus for DOS 3.10  MAJOR would
  198.                   be equal to 3 and MINOR would be equal to 10.
  199.  
  200. ------------------------------------------------------------------------
  201.  
  202.  6. set dos return code--------object module "SETRC.OBJ"
  203.     CALL SETRC(RC)
  204.          note: 1. argument RC should be declared integer*2
  205.                   and can range from 0 to 255.
  206.                2. this routine will set the return code. This should
  207.                   be called just before a "STOP" statement in your
  208.                   FORTRAN source. The RETURN CODE may be retrieved
  209.                   by:
  210.                          A) testing the return code value in the
  211.                             SPAWN and SYSTEM functions in Microsoft
  212.                             Fortran V3.30 or later.
  213.                          B) testing the ERRORLEVEL in BATCH files
  214.                          C) using DOS function 4Dh in assembler
  215.  
  216. ------------------------------------------------------------------------
  217.